const mongoose = require('mongoose')

//创建用户集合规则
const goodsSchema = new mongoose.Schema({
    productId: {
        type: String,
        required: true,
        unique: true
    },
    productName: {
        type: String,
        minlength: 1,
        maxlength: 16,
        required: true
    },
    productImage: {
        type: String,
        required: true
    },
    salePrice: {
        type: Number,
        required: true
    },
    "checked": String,
    "productNum": Number,
})

const Good = mongoose.model('Good', goodsSchema)

module.exports = {
    Good
}